{% extends extends_template %}

{% block location %}
<div class="nav"><a href="{% url accounts %}">Accounts</a></div>
{% if account %}
<div class="nav"><a href="{% url account_details account_id=account.id %}">{{account.name}}</a></div>
<div class="nav"><a href="{% url list_account_payments account_id=account.id %}">Payments</a></div>
<div class="nav"><a href="{% url account_payment_details  account_id=account.id payment_id=payment.id %}">{{payment.id}}</a></div>
{% else %}
<div class="nav"><a href="{% url list_payments %}">Payments</a></div>
<div class="nav"><a href="{% url payment_details  payment_id=payment.id %}">{{payment.id}}</a></div>
{% endif %}
{% endblock %}
{% block content %}
<div id="payment_details">
    <table class="info">
        <tr>
            <td>Date:</td>
            <td>{{payment.expiration_date}}</td>
        </tr>
        <tr>
            <td>From:</td>
            <td>{{payment.from_account.user.get_full_name}}</td>
        </tr>
        <tr>
            <td>To:</td>
            <td>{{payment.to_account.user.get_full_name}}</td>
        </tr>
        <tr>
            <td>Amount:</td>
            <td>{{payment.amount}} €</td>
        </tr>
        <tr>
            <td>Reference number:</td>
            <td>{{payment.reference_number}}</td>
        </tr>
        <tr>
            <td>Message:</td>
            <td>{{payment.message}}</td>
        </tr>
    </table>
</div>
{% endblock %}
